﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MyEntLibCMS.Model;

namespace MyEntLibCMS.IDAL
{
    public interface IUsersRepository
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <returns>用户实体信息</returns>
        User GetUserByUserID(int userID);

        /// <summary>
        /// 创建用户信息
        /// </summary>
        /// <param name="user">用户实体信息</param>
        /// <param name="login">登录实体信息 </param>
        /// <returns>ID</returns>
       int Create(User user, Login login);
        
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="user">用户实体信息</param>
        /// <returns>TRUE OR FALSE</returns>
        bool Update(User user);

        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <returns>TRUE OR FALSE</returns>
        bool Delete(int userID);

        /// <summary>
        /// 获取所有用户
        /// </summary>
        /// <returns>用户集合</returns>
        IList<User> GetAllUser();
    }
}
